@extends('backend::layout')
@section('title',trans($page_title))
@section('content')
    <div class="row"><div class="col-sm-12 mb-2">
            @component('backend::component.form.button')
                @slot('title') 修改信息 @endslot
                @slot('elem') a @endslot
                @slot('btn') btn @endslot
                @slot('color') primary @endslot
                @slot('icon') hcl-edit @endslot
                @slot('href') {{route('b_User_editUser',['id'=>$info->member_id])}} @endslot
            @endcomponent

            @component('backend::component.form.button')
                @slot('title') 重置密码 @endslot
                @slot('color') danger @endslot
                @slot('elem') a @endslot
                @slot('icon') hcl-pwd-reset @endslot
                @slot('class') modal-box @endslot
                @slot('params') {"area":"600px,500px","title":"重置密码"} @endslot
                @slot('href') {{route('b_User_resetUserPwd',['id'=>$info->member_id])}} @endslot
            @endcomponent


        </div></div>
    <div class="row"><div class="col-sm-12">
            @if($info)
                <table class="table table-bordered info-card">
                    <tbody>
                    <tr><td rowspan="5" style="min-width: 225px;width: 225px">
                            <div class="d-flex flex-column  text-center m-3">
                                <span class="hcl hcl-user1 text-muted" style="font-size: 6rem;"></span>
                                <div class="text-muted py-3" >
                                    <span>{{$info->user_number}}</span>
                                    <a class="text-info" href="{{route('b_User_editUser',['id'=>$info->member_id])}}"><span class="hcl hcl-tianxie"></span></a>
                                </div>
                                <span class="text-muted">{{$info->real_name}}</span>
                            </div>
                        </td>
                        <td class="table-active">姓名</td><td>{{$info->real_name}}【{{get_user_level($info->level)}}】【{{get_user_reg_type($info->reg_type)}}】</td>
                        <td class="table-active">手机号</td><td>{{$info->user_phone}}</td>
                    </tr>
                    <tr><td class="table-active">推荐人</td>
                        <td>@if($info->referrer)
                                {{$info->referrer->user_number}}
                                <a class="text-info" href="{{route('b_User_infoUser',['id'=>$info->referrer_id])}}">查看</a>
                            @else
                                无推荐人
                            @endif
                        </td>
                        <td class="table-active">直推人数</td><td>{{$info->share_num ?? 0}}</td>
{{--                        <td class="table-active">团队业绩</td><td>--}}
{{--                            {{$info->left_bill - $info->bill_money ?? 0}}--}}
{{--                            【大区：{{get_user_max_min_act($info->member_id)['max_bill'] ?? 0}}】--}}
{{--                            【小区：{{get_user_max_min_act($info->member_id)['min_bill'] ?? 0}}】--}}
{{--                        </td>--}}
                    </tr>

                    <tr><td class="table-active">注册时间</td><td>{{$info->created_at}}</td>
                        <td class="table-active">激活时间</td><td>{{$info->activated_at}}</td>
                    </tr>
                    <tr><td class="table-active">地址</td>
                        <td colspan="">
                            {{get_address($info->info->live_area)}}-{{$info->info->live_address}}
                        </td>
                        <td class="table-active">登录次数</td><td>{{$info->auth->login_count}}</td>
                    </tr>
                    <tr>
                        <td class="table-active">邀请码</td>
                        <td>{{$info->referrer_code}}</td>
                    </tr>
                    </tbody>
                </table>
                <div class="card">
                    <div class="card-body">
                        <h4 class="mb-2 text-dark" style="font-size: 1.05rem;">
                            <i class="hcl hcl-sq mr-1" style="font-size: 1.05rem;"></i>账户信息
                            @component('backend::component.form.button')
                                @slot('title') 校正账户 @endslot
                                @slot('elem') a @endslot
                                @slot('size') xs @endslot
                                @slot('color') danger @endslot
                                @slot('icon') hcl-tf-o @endslot
                                @slot('href') {{route('b_Account_correctAccount',['user'=>$info->user_number])}} @endslot
                            @endcomponent
                        </h4>
                        <table class="table table-bordered table-striped tbody info-card">
                            <tbody>
                            <tr>
                                @foreach($currencies as $name=>$title)
                                    <td>{{$title}}</td>
                                @endforeach
                            </tr>
                            <tr>
                                @foreach($currencies as $name=>$title)
                                    <td>{{$info->wallet->{$name} }}</td>
                                @endforeach
                            </tr>
                            </tbody>
                        </table>

                        <h4 class="mb-2 text-dark" style="font-size: 1.05rem;">
                            <i class="hcl hcl-sq mr-1" style="font-size: 1.05rem;"></i>实名认证信息
                            @if($info->is_real_name<1)
                                @component('backend::component.form.button')
                                    @slot('title') 认证通过 @endslot
                                    @slot('icon') hcl-user-sp @endslot
                                    @slot('color') danger @endslot
                                    @slot('params') {"url":"{{route('b_User_agreeRealName',['user_id'=>$info->member_id])}}","confirm":"true"} @endslot
                                    @slot('class') btn-ajax @endslot
                                @endcomponent
                            @endif
                        </h4>
                        <table class="table table-bordered table-striped tbody info-card">
                            <tbody>
                            <tr><td>真实姓名</td><td>身份证号</td><td colspan="2">身份证图片</td></tr>
                            <tr><td>{{$info->real_name}}</td><td>{{$info->info->ID_card}}</td>
                                <td colspan="2">
                                    <img height="80" onclick="showImg(this.src)" class="mr-5" src="{{$info->info->ID_card_front}}">
                                    <img height="80" onclick="showImg(this.src)" src="{{$info->info->ID_card_back}}">
                                </td>
                            </tr>
                            <tr><td>支付宝</td><td>微信</td><td>收款码</td><td>银行卡</td></tr>
                            <tr><td>{{$info->info->alipay??'无'}}</td><td>{{$info->info->weichat??'无'}}</td>
                                <td>
                                    <img height="80" onclick="showImg(this.src)" class="mr-5" src="{{$info->info->receiving_code}}">
                                </td>
                                <td>
                                    开户行:{{$info->info->bank_name}}<br/>
                                    卡号:{{$info->info->bank_card}}
                                </td>
                            </tr>

                            <tr>
                                <td>电子签名</td>
                                <td colspan="3"></td>
                            </tr>
                            <tr>
                                <td>
                                    <img height="80" onclick="showImg(this.src)" class="mr-5" src="{{$info->qianming_pic}}">
                                </td>
                                <td colspan="3"></td>
                            </tr>

                            </tbody>
                        </table>
                    </div>
                </div>
            @else
                @component('backend::public.empty_page')
                    @slot('info') 暂时没有会员 @endslot
                @endcomponent
            @endif
        </div></div>
@endsection